package ming.model.type;

import java.util.Date;
import java.util.UUID;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.apache.commons.lang.StringUtils;

@SuppressWarnings("serial")
@Entity
@Table(name = "t_tobacco_sms_log")
public class SmsLog implements java.io.Serializable {

	// Fields

	private String id;
	private String applyType;
	private String applyNo;
	private String area;
	private String areaPhone;
	private String smsPhone;
	private String smsContent;
	private String sendState;
	private Date sendTime;
	
	// Property accessors
	@Id
	@Column(name = "vcID", unique = true, nullable = false, length = 36)
	public String getId() {
		if (!StringUtils.isBlank(this.id)) {
			return this.id;
		}
		return UUID.randomUUID().toString();
	}

	public void setId(String id) {
		this.id = id;
	}


	@Column(name = "smsPhone", length = 20)
	public String getSmsPhone() {
		return smsPhone;
	}

	public void setSmsPhone(String smsPhone) {
		this.smsPhone = smsPhone;
	}

	@Column(name = "smsContent", length = 4000)
	public String getSmsContent() {
		return smsContent;
	}

	public void setSmsContent(String smsContent) {
		this.smsContent = smsContent;
	}

	@Column(name = "sendState", length = 3)
	public String getSendState() {
		return sendState;
	}

	public void setSendState(String sendState) {
		this.sendState = sendState;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "sendTime", length = 19)
	public Date getSendTime() {
		return sendTime;
	}

	public void setSendTime(Date sendTime) {
		this.sendTime = sendTime;
	}

	@Column(name = "areaPhone", length = 40)
	public String getAreaPhone() {
		return areaPhone;
	}

	public void setAreaPhone(String areaPhone) {
		this.areaPhone = areaPhone;
	}

	@Column(name = "applyType", length = 40)
	public String getApplyType() {
		return applyType;
	}

	public void setApplyType(String applyType) {
		this.applyType = applyType;
	}

	@Column(name = "applyNo", length = 36)
	public String getApplyNo() {
		return applyNo;
	}

	public void setApplyNo(String applyNo) {
		this.applyNo = applyNo;
	}

	@Column(name = "area", length = 40)
	public String getArea() {
		return area;
	}

	public void setArea(String area) {
		this.area = area;
	}

}